﻿<%@ Page Language="C#" MasterPageFile="~/admintractor/admin.master" AutoEventWireup="true" CodeFile="Category.aspx.cs" Inherits="admintractor_Category" Title="Chuyên mục thông tin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="title">Chuyên mục thông tin </div>
					<div id="view">
						<div class="edit">
                            <table style="width: 100%">
                                <tr>
                                    <td colspan="2">
                                        <b>Quản lý:</b></td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:Label ID="Label1" runat="server" ForeColor="Red" ></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        Tên khối tin:*</td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        <asp:TextBox ID="txtName" runat="server" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width:50px;">
                                        Thứ tự:*</td>
                                    <td>
                                        <asp:TextBox ID="txtPriority" runat="server" Width="50px"></asp:TextBox>
                                        (số)</td>
                                </tr>
                                <tr>
                                    <td colspan="2">
                                        
                                        <asp:CheckBox ID="cbView" runat="server" Text="Không hiển thị" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;</td>
                                    <td>
                                        <asp:Button ID="but_add" runat="server" Text="Thêm mới" 
                                            onclick="but_add_Click" />
                                    </td>
                                </tr>
                            </table>
                        </div>
						<div class="display">
                            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                AutoGenerateColumns="False" 
                                onpageindexchanging="GridView1_PageIndexChanging">
                                <Columns>
                                    <asp:BoundField HeaderText="Tên chuyên mục" DataField="_name" />
                                    <asp:TemplateField HeaderText="Hiển thị">
                                        <ItemStyle Width="60px" />
                                        <ItemTemplate>
                                        <%#this.view((string)(DataBinder.Eval(Container, "DataItem._display")))%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="Thứ tự" DataField="_priority">
                                        <ItemStyle Width="50px" />
                                    </asp:BoundField>
                                    <asp:TemplateField HeaderText="Thao tác">
                                    <ItemTemplate>
                                                    <table style="width: 100%">
                                                        <tr>
                                                            <td>
                                                                <asp:LinkButton ID="lbEdit" runat="server" Text="Sửa" CommandName="Select" 
                                                                    CommandArgument='<%# Eval("_id","{0}") %>' onclick="lbEdit_Click" ></asp:LinkButton>
                                                            </td>
                                                            <td>
                                                                <asp:LinkButton ID="lbDelete" runat="server" Text="Xóa" CommandArgument='<%# Eval("_id","{0}") %>'
                                                                 CommandName="Select"  OnClientClick="return confirm('Are you sure?');" onclick="lbDelete_Click" 
                                                                ></asp:LinkButton>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </div>
					</div>
</asp:Content>

